import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';

@Component({
  selector: 'app-routing',
  templateUrl: './routing.component.html',
  styleUrls: ['./routing.component.scss'],
})
export class RoutingComponent implements OnInit {
  constructor(private router: Router) {}

  ngOnInit(): void {}

  selectedValue = '';
  optionList = [
    { label: 'cc(cc)', value: '1' },
    { label: 'dwptest(dwptest)', value: '2' },
  ];
  dataSet = [
    {
      index: '1',
      name: '默认分组',
      type: 1,
      serviceName: 'pgr-service',
      apiUrl: '/peng/xian/sheng/7',
      method: 1,
      plugin: '日志插件-alageek,wojiaozlz',
      req: 1,
      age: 32,
    },
    {
      index: '2',
      name: '默认分组',
      type: 2,
      serviceName: 'pgr-service',
      apiUrl: '/peng/xian/sheng/7',
      method: 2,
      plugin: '日志插件-alageek,wojiaozlz',
      req: 1,
      age: 32,
    },
  ];

  handleDelete() {
    console.log('AAAAAAA');
  }

  handleAdd() {
    console.log('AAAAAAAA');
    this.router.navigate(['/getway/routingDetail']);
  }
}
